package com.greenleaf.serviceImpl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.greenleaf.dao.OrderDao;
import com.greenleaf.entity.Order;
import com.greenleaf.entity.SearchCon;
import com.greenleaf.service.OrderService;
@Service("orderService")
public class OrderServiceImpl implements OrderService {
	@Resource	
private OrderDao orderDao;
	@Override
	public List<Order> getAllOrder(SearchCon searchCon) {
		return orderDao.getAllOrder(searchCon);
	}

	@Override
	public int getTotalOrder(SearchCon searchCon) {
		return orderDao.getTotalOrder(searchCon);
	}

	@Override
	public Order getOrderById(Integer orderId) {
		return orderDao.getOrderById(orderId);
	}

	

	@Override
	public int updateOrder(Order order) {
		return orderDao.updateOrder(order);
	}

	@Override
	public int updateOrderBySwitch(Order order) {
		return orderDao.updateOrderBySwitch(order);
	}

	@Override
	public int delOrder(int orderId) {
		return orderDao.delOrder(orderId);
	}

	@Override
	public int addOrder(Order order) {
		return orderDao.addOrder(order);
	}

	@Override
	public Order getOrderByNumber(String ordetNumber) {
		return orderDao.getOrderByNumber(ordetNumber);
	}

	@Override
	public int updateOrderByNumber(Order order) {
		return orderDao.updateOrderByNumber(order);
	}

	@Override
	public List<Order> getOrdetByState(Order order) {
		return orderDao.getOrdetByState(order);
	}

	
}
